﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace FileMonitor.Service.Provider.FileMonitor
{
    public enum ProcessState
    {
        Starting,
        Waitting,
        Running,
        Pause,
        Error
    }

    [DataContract]
    public class MonitorProcessInfo
    {
        private string _processName;

        [DataMember]
        public string ProcessName
        {
            get { return _processName; }
            set { this._processName = value; }
        }

        private string _processDescription;
        [DataMember]
        public string ProcessDescription
        {
            get { return _processDescription; }
            set { this._processDescription = value; }
        }

        private ProcessState _state = ProcessState.Waitting;

        [DataMember]
        public ProcessState State
        {
            get { return this._state; }
            set { this._state = value; }
        }
        private List<Exception> _exceptions = new List<Exception>();

        [DataMember]
        public List<Exception> Exceptions
        {
            get { return this._exceptions; }
            set { this._exceptions = value; }
        }

        private List<string> _messages = new List<string>();

        [DataMember]
        public List<string> Messages
        {
            get { return this._messages; }
            set { this._messages = value; }
        }


        private string _monitorPath;
        [DataMember]
        public string MonitorPath
        {
            get { return this._monitorPath; }
            set { this._monitorPath = value; }
        }

        
        private Dictionary<string,FileInfo> _fileInfos;
        [DataMember]
        public Dictionary<string,FileInfo> FileInfos
        {
            get { return this._fileInfos; }
            set { this._fileInfos = value; }
        }


        public MonitorProcessInfo(string Name, string Description)
        {
            this._processName = Name;
            this._processDescription = Description;
            this._fileInfos = new Dictionary<string, FileInfo>();
            this._exceptions = new List<Exception>();
            this._messages = new List<string>();
        }
        
    }
}
